/* eslint-disable no-undef */
// eslint-disable-next-line @typescript-eslint/no-var-requires
const CracoLessPlugin = require('craco-less')
const cracoWorkboxPlugin = require('workbox-webpack-plugin')

module.exports = {
  plugins: [
    {
      plugin: CracoLessPlugin,
      options: {
        lessLoaderOptions: {
          lessOptions: {
            modifyVars: { '@primary-color': 'rgb(0,82,204)', 'font-size-base': '16px' },
            javascriptEnabled: true,
          },
        },
      },
    },
    {
      plugin: cracoWorkboxPlugin,
      options: {
        additionalWebpackConfig: {
          devtool: 'source-map', // enable source map
        },
      },
    },
  ],
}
